<template>
  <j-modal
    title='项目列表'
    :visible='visible'
    width="800px"
    ok-text=''
    :footer="null"
    :ok-button-props="{ props: { disabled: true } }"
    @close="close"
  >
    <a-card :bordered='false'>
      <a-table
        ref='table'
        size='middle'
        bordered
        rowKey='id'
        :scroll="{ x: 550,y:500 }"
        :columns='columns'
        :dataSource='dataSource'
        :pagination='false'
        :loading='loading'
      >
      </a-table>
      
      <!-- table区域-end -->
    </a-card>
  </j-modal>
</template>
<script>
  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  import {httpAction, getAction, postAction, deleteAction} from '@/api/manage'
  import columns from './projectCheckColumns'

  export default {
    name: 'tempCheck',
    mixins: [JeecgListMixin],
    components: {},
    data() {
      return {
        // 表头
        columns: columns(this),
        queryParam: {},
        url: {
          list: '/performcheck/checkProjectInfo/queryProject',
        },
        visible: false,
        dataSource: [],
      }
    },
    computed: {},
    methods: {
      check(record) {
        this.dataSource = []
        this.queryParam.id = Object.assign({}, record).id
        this.loadData()
        this.visible = true
      },
      close() {
        this.visible = false
      },
      mergeCells(text, data, key, index) {
        // 上一行该列数据是否一样
        if (index !== 0 && text === data[index - 1][key]) {
          return 0;
        }
        let rowSpan = 1;
        // 判断下一行是否相等
        for (let i = index + 1; i < data.length; i++) {
          if (text !== data[i][key]) {
            break;
          }
          rowSpan++;
        }
        return rowSpan;
      },
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>